const inquirer = require("inquirer");

// 应用问题
const questions = [
  {
    type: "confirm",
    name: "isCover",
    message: "当前应用名称已存在，是否要覆盖？",
    default: "",
  },
];

const shouldCover = async () => {
  try {
    const { isCover } = await inquirer.prompt(questions);
    return isCover;
  } catch (err) {
    Promise.reject("取消提问操作");
  }
};

module.exports = {
  shouldCover,
};
